package com.mjh.service.impl;

import com.mjh.bean.Product;
import com.mjh.mapper.ProductMapper;
import com.mjh.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;
    @Override
    public List<Product> queryProducts() {
        return productMapper.selectAll();
    }

    @Override
    public Product queryProductByName(String productName) {
        return productMapper.selectProductByName(productName);
    }
}
